
package com.yuan.servlet;

import com.yuan.hibernate.员工信息表DAO;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class getuserinfo extends BaseHttpServlet {
    private 员工信息表DAO m员工信息表DAO = null;

    public void doGet(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        super.doGet(request, response);
        m员工信息表DAO = new 员工信息表DAO();
        String phone = request.getParameter("phone");
        if (phone == null || phone.length() < 1 || phone.equals("null")) {
            mResponse = "输入有误";
        } else
        {
            List<?> list = m员工信息表DAO.findBy电话(phone);
            mResponse = com.yuan.util.JsonUtils.getFromList(list);
        }
        closeAndClear();
    }

    protected synchronized void closeAndClear() {
        m员工信息表DAO = null;
        super.closeAndClear();
    }
}
